import request from '@/utils/request'

// 获取酒店列表
export const getHotelList = (query) => {
  return request({
    url: '/system/hotel/list',
    method: 'get',
    params: query
  })
}
//删除
export const DelHotel = (id) => {
  return request({
    url: '/system/hotel/del/'+id,
    method: 'get'
  })
}
//新增
export const AddHotel = (query) => {
  return request({
    url: '/system/hotel/add',
    method: 'post',
    data: query
  })
}
//修改
// export const UpdateHotel = (query) => {
//   return request({
//     url: '/system/hotel/update',
//     method: 'post',
//     data: query
//   })
// }
//酒店详情
export const GetDetail = (id) => {
  return request({
    url: '/system/hotel/getDetail/'+id,
    method: 'get',
  })
}
// 上传图片
export function uploadImage(data,id) {
  return request({
    url: '/system/file/upload/' + id,
    method: 'post',
    data
  })
}

export const bindRule = (query) => {
  return request({
    url: '/system/hotel/bindRule',
    method: 'post',
    data: query
  })
}
export const updateRule = (query) => {
  return request({
    url: '/system/hotel/update',
    method: 'post',
    data: query
  })
}
